<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>导入结果</title>
</head>

<body>
	<div id="fullbg"></div>
	<div id="dialog">
		<div>
			<img src="${ctx }/static/022.gif"></img>
		</div>
	</div>
	
	<section class="content">
	
	<div class="row">
			<div class="col-md-12">
				<!-- Primary box -->
				<div class="box box-solid box-primary">
					<div class="box-header">
						<i class="fa fa-search"></i>
						<h3 class="box-title">处理结果</h3>
						<div class="box-tools pull-right">
							<button class="btn btn-primary btn-sm" data-widget="collapse">
								<i class="fa fa-minus"></i>
							</button>
						</div>
					</div>
					<div class="box-body">	
					    <c:if test="${message eq 'success'}">
					    	
					    	<div class="row list-group-item">
		      				<div class="col-md-3">总数量:</div>
		      				<div class="col-md-9">${allSize }条</div>
		      				</div>
		      				  		
		      				<div class="row list-group-item">
		      				<div class="col-md-3">成功总数量:</div>
		      				<div class="col-md-9">${normalSize }条</div>
		      				</div>
		      				
		      				<div class="row list-group-item">
		      				<div class="col-md-3">重复数量:</div>
		      				<div class="col-md-9">${repeatedSize }条</div>
		      				</div>
		      				
		      				<div class="row list-group-item">
		      				<div class="col-md-3">失败数量:</div>
		      				<div class="col-md-9">${exceptionSize }条 <%-- (重复导入${repeatedSize }条) --%>
		      				  
		      				</div>
		
		      				</div>
	      				</c:if>
	      				
	      				 <c:if test="${message ne 'success'}">
	      				 	<h4>${message } </h4>
	      				 </c:if>
	      			</div>
				</div>
				
				
				<div class="row">
				<table  class="table table-striped table-bordered table-condensed">
					<thead>
						<tr bgcolor="#3FA8F3" >
						   <th colspan="6"  style="height: 30px;font-size: 18px;color: white; vertical-align: middle;" >以下商品数据异常,请核对后重新同步</th>
						</tr>
						<tr>
							<th>商家</th>
							<th>仓库</th>
							<th>快递公司</th>
							<th>订单号</th>
							<th>快递单号</th>
							<th>描述</th>		
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${failList}" var="obj">
						<tr>
						   <td>${obj.customerCode }</td>
						   <td>${obj.warehouseCode }</td>
						   <td>${obj.expressCompany }</td>
						   <td>${obj.orderNo }</td>
						   <td>${obj.ebillNo }</td>
						   <td>${obj.goodsInfo }</td>
						</tr>
						</c:forEach>
					</tbody>
				</table>
				</div>
				
<%-- 				<div class="row">
				<table  class="table table-striped table-bordered table-condensed">
					<thead>
						<tr bgcolor="#3FA8F3" >
						   <th colspan="6"  style="height: 30px;font-size: 18px;color: white; vertical-align: middle;" >成功数据</th>
						</tr>
						<tr>
							<th>商家</th>
							<th>仓库</th>
							<th>快递公司</th>
							<th>订单号</th>
							<th>快递单号</th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${successList}" var="obj">
						<tr>
						   <td>${obj.customerCode }</td>
						   <td>${obj.warehouseCode }</td>
						   <td>${obj.expressCompany }</td>
						   <td>${obj.orderNo }</td>
						   <td>${obj.ebillNo }</td>
						</tr>
						</c:forEach>
					</tbody>
				</table>
				</div> --%>
		
					<div class="modal-footer">
	        			<input id="cancel_btn"
							class="btn btn-primary" type="button" value="返回" onclick="window.location.href ='${ctx}/v2/expressNoInput/init'" />
	      			</div>
	      			
			</div>
		</div>
		
</section>	
<script type="text/javascript">
	//页面初始化
	$(document).ready(function(){
		//禁止退格键 作用于Firefox、Opera   
	    document.onkeypress = banBackSpace;  
	    //禁止退格键 作用于IE、Chrome  
	    document.onkeydown = banBackSpace; 
	});
	//处理键盘事件 禁止后退键（Backspace）密码或单行、多行文本框除外   
	function banBackSpace(e){  
	    //alert(event.keyCode)  
	    var ev = e || window.event;//获取event对象     
	    var obj = ev.target || ev.srcElement;//获取事件源       
	    var t = obj.type || obj.getAttribute('type');//获取事件源类型       
	    //获取作为判断条件的事件类型   
	    var vReadOnly = obj.readOnly;  
	    var vDisabled = obj.disabled;  
	    //处理undefined值情况   
	    vReadOnly = (vReadOnly == undefined) ? false : vReadOnly;  
	    vDisabled = (vDisabled == undefined) ? true : vDisabled;  
	    //当敲Backspace键时，事件源类型为密码或单行、多行文本的，    
	    //并且readOnly属性为true或disabled属性为true的，则退格键失效    
	    var flag1 = ev.keyCode == 8 && (t == "password" || t == "text" || t == "textarea") && (vReadOnly == true || vDisabled == true);  
	    //当敲Backspace键时，事件源类型非密码或单行、多行文本的，则退格键失效      
	    var flag2 = ev.keyCode == 8 && t != "password" && t != "text" && t != "textarea";  
	    //判断      
	    if (flag2 || flag1)   
	        event.returnValue = false;//这里如果写 return false 无法实现效果   
	} 
</script>
</body>
</html>
